package com.infore.maintenance.main.controller;

import com.infore.common.base.Msg;
import com.infore.common.base.ResultUtil;
import com.infore.common.fw.BaseController;
import com.infore.maintenance.main.service.BusinessExceptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 测试 前端控制器
 * </p>
 *
 * @author lijh
 * @since 2022-11-25
 */
@RestController
@Api(value = "测试前端控制器", tags = "测试前端控制器")
@RequestMapping("/test")
public class BusinessBriefingController extends BaseController {

    @Value("${spring.application.name}")
    private String namespace;

    @Autowired
    private BusinessExceptService businessExceptService;

    @RequestMapping(value = "/info", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    @ApiOperation(value = "接口信息打印", notes = "接口信息打印")
    public Msg<Object> info() {
        System.out.println("测试接口！！！");
        businessExceptService.testExcept();
        return ResultUtil.success("请求成功="+namespace) ;

    }


}

